package SendRedBag;

import java.util.ArrayList;
import java.util.Random;

public class Menber extends User {
    public Menber() {

    }

    //接受红包
    public  void receive(ArrayList moneyList){
        //先抢红包

        //从红包中抽第几个
        int i = new Random().nextInt(moneyList.size());
        Integer removeMoney = (Integer)moneyList.remove(i);//抽取到的红包

        super.setMoney(super.getMoney() + removeMoney);//添加到自己账户中

    }
}
